package com.ruoyi.system.service.impl;

import com.ruoyi.common.core.utils.DateUtils;
import com.ruoyi.system.domain.SysInvestorMsg;
import com.ruoyi.system.mapper.SysInvestorMsgMapper;
import com.ruoyi.system.service.ISysInvestorMsgService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import javax.annotation.Resource;
import java.util.List;

/**
 * 投资信息Service业务层处理
 * 
 * @author paul
 * @date 2023-06-25
 */
@Service
public class SysInvestorMsgServiceImpl implements ISysInvestorMsgService
{
    @Resource
    private SysInvestorMsgMapper sysInvestorMsgMapper;

    /**
     * 查询投资信息
     * 
     * @param id 投资信息主键
     * @return 投资信息
     */
    @Override
    public SysInvestorMsg selectSysInvestorMsgById(Long id)
    {
        return sysInvestorMsgMapper.selectSysInvestorMsgById(id);
    }

    /**
     * 查询投资信息列表
     * 
     * @param sysInvestorMsg 投资信息
     * @return 投资信息
     */
    @Override
    public List<SysInvestorMsg> selectSysInvestorMsgList(SysInvestorMsg sysInvestorMsg)
    {
        return sysInvestorMsgMapper.selectSysInvestorMsgList(sysInvestorMsg);
    }

    /**
     * 新增投资信息
     * 
     * @param sysInvestorMsg 投资信息
     * @return 结果
     */
    @Override
    public int insertSysInvestorMsg(SysInvestorMsg sysInvestorMsg)
    {
        sysInvestorMsg.setCreateTime(DateUtils.getNowDate());
        return sysInvestorMsgMapper.insertSysInvestorMsg(sysInvestorMsg);
    }

    /**
     * 修改投资信息
     * 
     * @param sysInvestorMsg 投资信息
     * @return 结果
     */
    @Override
    public int updateSysInvestorMsg(SysInvestorMsg sysInvestorMsg)
    {
        sysInvestorMsg.setUpdateTime(DateUtils.getNowDate());
        return sysInvestorMsgMapper.updateSysInvestorMsg(sysInvestorMsg);
    }

    /**
     * 批量删除投资信息
     * 
     * @param ids 需要删除的投资信息主键
     * @return 结果
     */
    @Override
    public int deleteSysInvestorMsgByIds(Long[] ids)
    {
        return sysInvestorMsgMapper.deleteSysInvestorMsgByIds(ids);
    }

    /**
     * 删除投资信息信息
     * 
     * @param id 投资信息主键
     * @return 结果
     */
    @Override
    public int deleteSysInvestorMsgById(Long id)
    {
        return sysInvestorMsgMapper.deleteSysInvestorMsgById(id);
    }
}
